![]() |
ControlUserPaneHitTestProcPtr |
||||
Header: | ControlDefinitions.h | Carbon status: | Supported | |
Returns the part code of the control that the point was in when the mouse-down event occurred.
typedef ControlPartCode(* ControlUserPaneHitTestProcPtr) ( ControlRef control, Point where );
You would declare your function like this if you were to name it MyControlUserPaneHitTestCallback:
ControlPartCode MyControlUserPaneHitTestCallback ( ControlRef control, Point where );
A handle to the control in which the mouse-down event occurred.
The point, in a window’s local coordinates, where the mouse-down event occurred.
The part code of the control where the mouse-down event occurred. If the point was not over a control, your function should return kControlNoPart.0
The Control Manager defines the data type ControlUserPaneHitTestUPP to identify the universal procedure pointer for this application-defined function:
typedef UniversalProcPtr ControlUserPaneHitTestUPP;
You typically use the NewControlUserPaneHitTestProc macro like this:
ControlUserPaneHitTestUPP myControlUserPaneHitTestUPP;
myControlUserPaneHitTestUPP = NewControlUserPaneHitTestProc(MyControlUserPaneHitTestCallback);
You typically use the CallControlUserPaneHitTestProc macro like this:
CallControlUserPaneHitTestProc(myControlUserPaneHitTestUPP, control, where);
Once you have provided a user pane application-defined function, you can call the function SetControlData in order to associate your function with a control. User pane application-defined functions are identified to SetControlData by tag constants; for a description of the tag constants, see the “Control Manager Constants” section. For example, once you have created the function MyControlUserPaneHitTestCallback, pass kControlUserPaneHitTestProcTag in the tagName parameter of SetControlData.
This function is available with Appearance Manager 1.0 and later.
Supported in Carbon.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)